package day02;

/**
 * @author Jetwang
 * @version 1.0
 * @since 2023/3/13 11:13
 */
public class LinkedListDequeTest {
    public static void main(String[] args) {
        LinkedListDeque<Integer> deque = new LinkedListDeque<>(5);

        deque.offerFirst(1);
        deque.offerFirst(2);
        deque.offerFirst(3);
        deque.offerLast(4);
        deque.offerLast(5);
        deque.offerLast(6);
        deque.forEach(System.out::println);
        System.out.println("======");
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollFirst()); // null
    }
}
